<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>学员信息管理系统</title>
    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/index.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">
            <img src="/static/imgs/logo.png" alt="云舒社区">
        </div>
        <!-- 头部区域（可配合layui已有的水平导航） -->

        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    ${user.userName}
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:">基本资料</a></dd>
                    <dd><a href="javascript:" id="resetPass">修改密码</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="/logout">退出</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <c:forEach items="${menuList}" var="moduleMenu" varStatus="i">
                    <li class="layui-nav-item <c:if test="${i.first}">layui-nav-itemed</c:if>">
                        <a href="javascript:">${moduleMenu.name}</a>
                            <dl class="layui-nav-child">
                                <c:forEach items="${moduleMenu.submenus}" var="pageMenu">
                                    <dd><a href="${pageMenu.uri}" target="main_frame">${pageMenu.name}</a></dd>
                                </c:forEach>
                            </dl>
                    </li>
                </c:forEach>

                  <%-- <li class="layui-nav-item layui-nav-itemed">
                       <a class="" href="javascript:;">权限配置</a>
                       <dl class="layui-nav-child">
                           <dd><a href="/permission" target="main_frame">权限管理</a></dd>
                           <dd><a href="/role" target="main_frame">角色管理</a></dd>
                           <dd><a href="/user" target="main_frame">用户管理</a></dd>
                       </dl>
                   </li>
                   <li class="layui-nav-item layui-nav-itemed">
                       <a class="" href="javascript:;">学员管理</a>
                       <dl class="layui-nav-child">
                           <dd><a href="/student/list" target="main_frame">学员信息</a></dd>
                           <dd><a href="javascript:" target="main_frame">成绩录入</a></dd>
                       </dl>
                   </li>--%>

            </ul>

        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <iframe  name="main_frame"  class="main" src="/static/default.html" frameborder="0"></iframe>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © layui.com - 底部固定区域
    </div>
</div>
<script src="/static/js/plugins/jquery.js"></script>
<script src="/static/plugins/layui/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use(['element','layer'], function(){
        var element = layui.element;
        var layer = layui.layer

        $("#resetPass").on('click',function (e) {
            e.preventDefault();
            lay_rp = layer.open({
                type:2,
                closeBtn:1,
                title:'修改密码',
                area:['600px','400px'],
                content:'/resetPass',
               /* btn:['保存','取消'],*/
                yes:function(index,layero){
                   /* var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                    iframeWin.mySubmit();  //手动触发校验*/
                },
                btn2: function(index) {
                    layer.close(index);
                }

            })
        })

    });
</script>
</body>
</html>